<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>返回页面上所有相对URL的基URL</title>
</head>

<body>
    <p>基础URL 是:
        <script>
            document.write(document.getElementById("htmldom").href);
        </script>
    </p>
</body>

</html>